﻿using System;
using System.CodeDom.Compiler;
using System.Reflection;
using Prism.Mvvm;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.Xaml.Internals;

namespace AutoR.Views.Home
{
	// Token: 0x0200002C RID: 44
	[XamlFilePath("Views\\Home\\Campaign.xaml")]
	public class Campaign : ContentPage
	{
		// Token: 0x060000AC RID: 172 RVA: 0x0001CA71 File Offset: 0x0001AC71
		public Campaign()
		{
			this.InitializeComponent();
		}

		// Token: 0x060000AD RID: 173 RVA: 0x0001CA80 File Offset: 0x0001AC80
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private void InitializeComponent()
		{
			if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(Campaign).GetTypeInfo().Assembly.GetName(), "Views/Home/Campaign.xaml") != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			Label label = new Label();
			BindingExtension bindingExtension = new BindingExtension();
			Switch @switch = new Switch();
			StackLayout stackLayout = new StackLayout();
			Label label2 = new Label();
			BindingExtension bindingExtension2 = new BindingExtension();
			string item = "驱逐--简单";
			string item2 = "驱逐--困难";
			string item3 = "巡洋--简单";
			string item4 = "巡洋--困难";
			string item5 = "战列--简单";
			string item6 = "战列--困难";
			string item7 = "航母--简单";
			string item8 = "航母--困难";
			string item9 = "潜艇--简单";
			string item10 = "潜艇--困难";
			Picker picker = new Picker();
			Label label3 = new Label();
			BindingExtension bindingExtension3 = new BindingExtension();
			string item11 = "单纵阵";
			string item12 = "复纵阵";
			string item13 = "轮型阵";
			string item14 = "梯形阵";
			string item15 = "单横阵";
			Picker picker2 = new Picker();
			Label label4 = new Label();
			BindingExtension bindingExtension4 = new BindingExtension();
			Switch switch2 = new Switch();
			StackLayout stackLayout2 = new StackLayout();
			Label label5 = new Label();
			BindingExtension bindingExtension5 = new BindingExtension();
			string item16 = "大中破快速";
			string item17 = "大破快速";
			string item18 = "澡堂";
			Picker picker3 = new Picker();
			StackLayout stackLayout3 = new StackLayout();
			Label label6 = new Label();
			BindingExtension bindingExtension6 = new BindingExtension();
			Switch switch3 = new Switch();
			Label label7 = new Label();
			BindingExtension bindingExtension7 = new BindingExtension();
			Entry entry = new Entry();
			StackLayout stackLayout4 = new StackLayout();
			Label label8 = new Label();
			BindingExtension bindingExtension8 = new BindingExtension();
			BindingExtension bindingExtension9 = new BindingExtension();
			BindingExtension bindingExtension10 = new BindingExtension();
			TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
			Label label9 = new Label();
			StackLayout stackLayout5 = new StackLayout();
			Label label10 = new Label();
			StackLayout stackLayout6 = new StackLayout();
			Frame frame = new Frame();
			StackLayout stackLayout7 = new StackLayout();
			NameScope nameScope = new NameScope();
			NameScope.SetNameScope(this, nameScope);
			this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
			this.SetValue(Page.TitleProperty, "战役");
			frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(2.0));
			frame.SetValue(View.MarginProperty, new Thickness(3.0, 3.0, 3.0, 0.0));
			stackLayout.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			label.SetValue(Label.TextProperty, "战役");
			label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout.Children.Add(label);
			@switch.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			bindingExtension.Path = "Game.CampaignTask.Enabled";
			BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
			@switch.SetBinding(Switch.IsToggledProperty, binding);
			stackLayout.Children.Add(@switch);
			stackLayout6.Children.Add(stackLayout);
			stackLayout2.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			label2.SetValue(Label.TextProperty, "目标点:");
			label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout2.Children.Add(label2);
			bindingExtension2.Path = "Game.CampaignTask.NodeIndex";
			BindingBase binding2 = ((IMarkupExtension<BindingBase>)bindingExtension2).ProvideValue(null);
			picker.SetBinding(Picker.SelectedIndexProperty, binding2);
			picker.Items.Add(item);
			picker.Items.Add(item2);
			picker.Items.Add(item3);
			picker.Items.Add(item4);
			picker.Items.Add(item5);
			picker.Items.Add(item6);
			picker.Items.Add(item7);
			picker.Items.Add(item8);
			picker.Items.Add(item9);
			picker.Items.Add(item10);
			stackLayout2.Children.Add(picker);
			label3.SetValue(Label.TextProperty, "阵型:");
			label3.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout2.Children.Add(label3);
			bindingExtension3.Path = "Game.CampaignTask.Formation";
			BindingBase binding3 = ((IMarkupExtension<BindingBase>)bindingExtension3).ProvideValue(null);
			picker2.SetBinding(Picker.SelectedIndexProperty, binding3);
			picker2.Items.Add(item11);
			picker2.Items.Add(item12);
			picker2.Items.Add(item13);
			picker2.Items.Add(item14);
			picker2.Items.Add(item15);
			stackLayout2.Children.Add(picker2);
			label4.SetValue(Label.TextProperty, "夜战:");
			label4.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout2.Children.Add(label4);
			bindingExtension4.Path = "Game.CampaignTask.IsNightWar";
			BindingBase binding4 = ((IMarkupExtension<BindingBase>)bindingExtension4).ProvideValue(null);
			switch2.SetBinding(Switch.IsToggledProperty, binding4);
			stackLayout2.Children.Add(switch2);
			stackLayout6.Children.Add(stackLayout2);
			stackLayout3.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			label5.SetValue(Label.TextProperty, "修理方式:");
			label5.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout3.Children.Add(label5);
			bindingExtension5.Path = "Game.CampaignTask.RepairStrategy";
			BindingBase binding5 = ((IMarkupExtension<BindingBase>)bindingExtension5).ProvideValue(null);
			picker3.SetBinding(Picker.SelectedIndexProperty, binding5);
			picker3.Items.Add(item16);
			picker3.Items.Add(item17);
			picker3.Items.Add(item18);
			stackLayout3.Children.Add(picker3);
			stackLayout6.Children.Add(stackLayout3);
			stackLayout4.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			label6.SetValue(Label.TextProperty, "战役进战斗SL:");
			label6.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout4.Children.Add(label6);
			switch3.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			bindingExtension6.Path = "Game.GlobalConfig.CampaignSL";
			BindingBase binding6 = ((IMarkupExtension<BindingBase>)bindingExtension6).ProvideValue(null);
			switch3.SetBinding(Switch.IsToggledProperty, binding6);
			stackLayout4.Children.Add(switch3);
			label7.SetValue(Label.TextProperty, "SL次数:");
			label7.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			label7.SetValue(View.MarginProperty, new Thickness(10.0, 0.0, 0.0, 0.0));
			stackLayout4.Children.Add(label7);
			bindingExtension7.Path = "Game.CampaignTask.SLNumber";
			BindingBase binding7 = ((IMarkupExtension<BindingBase>)bindingExtension7).ProvideValue(null);
			entry.SetBinding(Entry.TextProperty, binding7);
			BindableObject bindableObject = entry;
			BindableProperty fontSizeProperty = Entry.FontSizeProperty;
			IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
			string value = "15";
			XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
			Type typeFromHandle = typeof(IProvideValueTarget);
			object[] array = new object[0 + 6];
			array[0] = entry;
			array[1] = stackLayout4;
			array[2] = stackLayout6;
			array[3] = frame;
			array[4] = stackLayout7;
			array[5] = this;
			object service;
			xamlServiceProvider.Add(typeFromHandle, service = new SimpleValueTargetProvider(array, Entry.FontSizeProperty, nameScope));
			xamlServiceProvider.Add(typeof(IReferenceProvider), service);
			Type typeFromHandle2 = typeof(IXamlTypeResolver);
			XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
			xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
			xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
			xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
			xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(Campaign).GetTypeInfo().Assembly));
			xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(57, 77)));
			bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
			entry.SetValue(Entry.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
			entry.SetValue(VisualElement.WidthRequestProperty, 70.0);
			entry.SetValue(InputView.MaxLengthProperty, 3);
			entry.SetValue(InputView.KeyboardProperty, new KeyboardTypeConverter().ConvertFromInvariantString("Numeric"));
			stackLayout4.Children.Add(entry);
			stackLayout6.Children.Add(stackLayout4);
			stackLayout5.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			label8.SetValue(Label.TextProperty, "学院技能满时停止SL:");
			label8.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout5.Children.Add(label8);
			bindingExtension8.Path = "Game.CampaignTask.TacticsName";
			BindingBase binding8 = ((IMarkupExtension<BindingBase>)bindingExtension8).ProvideValue(null);
			label9.SetBinding(Label.TextProperty, binding8);
			label9.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			label9.SetValue(View.MarginProperty, new Thickness(5.0, 0.0, 0.0, 0.0));
			label9.SetValue(Label.TextColorProperty, Color.MidnightBlue);
			bindingExtension9.Path = "TacticsCommand";
			BindingBase binding9 = ((IMarkupExtension<BindingBase>)bindingExtension9).ProvideValue(null);
			tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, binding9);
			bindingExtension10.Path = "Game.CampaignTask.TacticsShip";
			BindingBase binding10 = ((IMarkupExtension<BindingBase>)bindingExtension10).ProvideValue(null);
			tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding10);
			label9.GestureRecognizers.Add(tapGestureRecognizer);
			stackLayout5.Children.Add(label9);
			stackLayout6.Children.Add(stackLayout5);
			label10.SetValue(Label.TextProperty, "战役进战斗SL：练学院技能专用，比如大角度等");
			BindableObject bindableObject2 = label10;
			BindableProperty fontSizeProperty2 = Label.FontSizeProperty;
			IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
			string value2 = "12";
			XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
			Type typeFromHandle3 = typeof(IProvideValueTarget);
			object[] array2 = new object[0 + 5];
			array2[0] = label10;
			array2[1] = stackLayout6;
			array2[2] = frame;
			array2[3] = stackLayout7;
			array2[4] = this;
			object service2;
			xamlServiceProvider2.Add(typeFromHandle3, service2 = new SimpleValueTargetProvider(array2, Label.FontSizeProperty, nameScope));
			xamlServiceProvider2.Add(typeof(IReferenceProvider), service2);
			Type typeFromHandle4 = typeof(IXamlTypeResolver);
			XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();
			xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
			xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
			xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
			xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(Campaign).GetTypeInfo().Assembly));
			xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(67, 52)));
			bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
			label10.SetValue(Label.TextColorProperty, Color.RoyalBlue);
			stackLayout6.Children.Add(label10);
			frame.SetValue(ContentView.ContentProperty, stackLayout6);
			stackLayout7.Children.Add(frame);
			this.SetValue(ContentPage.ContentProperty, stackLayout7);
		}

		// Token: 0x060000AE RID: 174 RVA: 0x0001D57E File Offset: 0x0001B77E
		private void __InitComponentRuntime()
		{
			this.LoadFromXaml(typeof(Campaign));
		}
	}
}
